\section{Relevant Game Design Theories} \label{gameDesign}
\subsection{Definition of Puzzles in Games} \label{puzzleDefinition}
Game designer Scott Kim defines puzzles as some kind of toy or other contrivance that is designed to amuse by presenting difficulties to be solved by ingenuity or patient effort. \textit{A puzzle is something that is supposed to be fun and has a right answer} \citep{gameDesignWorkshop}. He further identifies four types of play activities:

\begin{enumerate}
\item Game (winning): Rule-based system in which the goal is for the player to win. Typically you have to beat another player or the system itself.
\item Puzzle (goal): Rule-based systems similar to games. Can have mechanics as games, but the goal is to find a specific solution, not to beat an opponent. Puzzles often have little replay value, since you already found the answer.
\item Toy (no goal): Manipulatable like puzzles, but has no fixed goals.
\item Story (no interaction): Fantasy-play like toys, but can typically not be changed/manipulated by the player.
\end{enumerate}

According to Kim, the purpose of a puzzle is to take something ordinary and present it in a novel and playful way. It should be somewhat tricky and require a perceptual shift, i.e.\  make the player create new mental models. An important aspect when designing puzzles is finding the right balance between being too easy and too hard --- in other words, \textit{flow} \citep{flow} is paramount. It should be noted that various types of puzzles, e.g.\ mathematical puzzles, visual puzzles, word puzzles, etc., appeal to different people. Just as with game design, the overall goal should be to keep the player in a pleasurably and challenging state of flow \citep{gameDesignWorkshop}. Similarly, \cite{learningByDesign} states that \textit{"}[\textit{u}]\textit{nder the right conditions, learning, like sex, is biologically motivating and pleasurable for humans (and other primates)."} Puzzles are about solving problems using previously-gained knowledge.

\subsection{Learning in Games and the Use of Tutorials}
Videogames often make use of one of more kinds of tutorials, typically in the beginning of the game. According to \cite{impactTutorials}, the value of a tutorial depends on the complexity of the game. However, it varies greatly from game to game. The same can be said about what types of tutorials and hints that are implemented, as well as when they are exposed to the player. \cite{impactTutorials} constructed a study with eight tutorial designs in three different videogames: \textit{Refraction}, \textit{Hello Worlds} and \textit{Foldit}. These three games all belong to different genres and vary in their complexity. The goal of the test was to evaluate the tutorials' effects on players' engagement and retention. The test consisted of over 45,000 players (via the Internet site Kongregate.com). It was performed as a multivariate experiment considering four independent variables and a total of eight conditions. Their results suggest that players seem to learn more from experimentation than from reading text. They also found that tutorials can have a negligible effect on player engagement in less complex games. It seems that tutorials have the best effect in games that are complex and/or untraditional, meaning that players cannot rely on knowledge gained from previously-played games \citep{impactTutorials}. The same goes for presenting tutorials based on context, i.e.\ that the tutorial is shown close to where the information is needed in order to complete the game.

A different study by \cite{pedagogic} looked at pedagogics in relationship to children and creativity. They set out to investigate the implications of explicit instructions on exploratory play. Their results suggest that teaching can constrain children's exploration and discovery. They saw that children who were taught a function of a toy performed fewer kinds of actions on the toy and discovered fewer of its other functions, than children who did not receive a pedagogical demonstration. Giving a helping hand can promote efficiency in learning, but it comes at a cost, since children are less likely to explore, experiment and discover novel ways of interaction. One could argue that these results are applicable in the world of videogames.

Another element to consider in game design is the degree of freedom a player has when learning a new concept. Game designers often let the player experiment and apply their new knowledge. James Paul Gee has researched how learning principles can be applied in videogames and argues that such experimentation in a game is most effective when it occurs in a safe environment, i.e.\ where mistakes are not punished \citep{learningByDesign}.

\subsection{Design Principles in Regards to Learning in Games} \label{principles}
\cite{learningByDesign} states: \textit{"When we think of games, we think of fun. When we think of learning we think of work. Games show us this is wrong. They trigger deep learning that is itself part and parcel of the fun."} Additionally, he lists a number of learning principles game designers can (and do) utilize to motivate players. It is suggested that game designers can learn a great deal from cognitive scientists by being aware of these principles. The following are a selection of some of the principles \citep{learningByDesign}:

\begin{enumerate}
\item Co-Design: Good learning requires that learners feel like active agents (producers) not just passive recipients (consumers).

% xWhere to refer to? Maybe cognitive science stuff
%Player is active and try to solve puzzle himself
%Never take away control from player (no cutscenes)

\item Well-Order Problems: The problems learners face early on are crucial and should be well-designed to lead them to solutions that work well, not just on these problems, but as aspects of the solutions to later, harder problems.

% xLevel design: Start room

\item Pleasantly Frustrating: Learning works best when new challenges are pleasantly frustrating in the sense of being felt by learners to be at the outer edge of, but within, their "regime of competence". That is, these challenges feel hard, but doable.

%x Dexterity + deduction skills
%Pacing of level design

\item Cycles of Expertise: Expertise is formed in any area by repeated cycles of learners practicing skills until they are nearly automatic, then having those skills fail in ways that cause the learners to have to think again and learn anew.

% x Dexterity and level design
%Repeater challenges

\item Information "On Demand" and "Just in Time": Human beings are quite poor at using verbal information (i.e., words) when given lots of it out of context and before that can see how it applies in actual situations. They use verbal information best when it is given "just in time" (when they can put it to use) and "on demand" (when they feel they need it).

% xHints
%On demand (old hint always available) OR just in time (hints)

\item Fish Tanks: In the real world, a fish tank can be a little simplified eco-system that clearly displays some critical variables and their interactions that are otherwise obscured in the highly complex eco-system in the real world. Fish tanks can be stripped down versions of the game, either as tutorials or as their first level or two.

% xLevel design - first level compared to crane room
%Cannot fail game permanently

\item System Thinking: People learn skills, strategies, and ideas best when they see how they fit into an overall larger system to which they give meaning. In fact, any experience is enhanced when we understand how it fits into a larger meaningful whole.

%Game in general
%Set goals for what type of experience the player should get from playing the game. Design the game's elements to achieve this feeling/experience from game workshop book

\item Meaning as Action Image: Humans do not usually think through general definitions and logical principles. Rather, they think through experiences they have had. Words and concepts have their deepest meanings when they are clearly tied to action in the world.

%Game in general
%Core concept: make game where all elements lead to shadow rule
%Maybe conclusion

\end{enumerate}

\subsection{Giving Players a Helping Hand via Hints} \label{hintsAnalyze}
\cite{impactTutorials} found that providing so-called "on-demand help" can increase player engagement. Having the option to get help if stuck can mean that a player who were ready to quit will maybe stay a little longer. However, it's a double-edged sword, since \cite{impactTutorials} also discovered that help buttons can have a negative impact on players' return rate. However, the study only tested a binary either/or scenario with games either having help buttons or not having help buttons. A different approach is to provide help in the form of hints that appear after a set amount of time. Instead of the player always having the option to get help, e.g.\ by clicking on a help button, hints can appear after the player has already put in effort to solve the game's puzzles.

Hints can be implemented in a game's environment directly. Games such as \textit{The Last of Us} (Naughty Dog) and \textit{Half-Life 2} (Valve Corporation) incorporate guiding principles directly into the level design by using combinations of light, color, shapes, audio and other elements that can nudge the player in the right direction \citep{levelDesignJamie}. An example of this is the Citadel building in \textit{Half-Life 2} (see Figure \ref{fig:HL2}). Even older titles such as the 1985 game \textit{Super Mario Bros.} (Nintendo) is designed to teach the game mechanics through the structure of its level design \citep{marioLevel}.

\begin{figure}[htbp] \centering
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=1\textwidth]{Pictures/Design/HL2_citadel} % Venstre billede
\end{minipage} \hfill
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=1\textwidth]{Pictures/Design/braidJump} % Højre billede
\end{minipage} \\ % Captions og labels
\begin{minipage}[t]{0.45\textwidth}
\caption{In \textit{Half-Life 2}, the Citadel building is used as a landmark for the player to orientate himself towards \citep{HL2}.} % Venstre caption og label
\label{fig:HL2}
\end{minipage} \hfill
\begin{minipage}[t]{0.45\textwidth}
\caption{In \textit{Braid}, the player is forced to learn how to jump \citep{braidPic}.} % Højre caption og label
\label{fig:braid}
\end{minipage}
\end{figure}

A similar approach is to put obstacles directly into the level design itself \citep{blockLeveldesign}. An example of this is \textit{Braid} (Jonathan Blow) where the player is presented for a small hill with a sign saying "SPACEBAR". The player can only proceed if he tries to hit the spacebar and thereby learn how to jump (see Figure \ref{fig:braid}). By doing this, the game designers can make sure that the player is aware of the jumping mechanic.

Games such as \textit{Uncharted: Drake's Fortune} (Naughty Dog) let the players explore on their own for some time. If the player appears to be stuck in the same area for too long, a gentle button prompt will be shown. Clicking the button makes the camera turn around and focus on the area where the player is supposed to go.

\textit{BioShock} (Irrational Games) has an option in the menu that shows an arrow in the top of the screen, indicating in which direction the player should move to get to the next objective (see Figure \ref{fig:BioShock}). This approach is implemented in the interface as an abstract layer on top of the game. The other approach is to incorporate the helping mechanism directly into the game's world itself --- in other words, make the hint diegetic \citep{DiegeticGame}. \textit{The Legend of Zelda: The Wind Waker} (Nintendo) does this by using the main character's eyes as a point of reference. Having big eyes gives the possibility to have the eyes look at objects in the environment that the player should focus on (see Figure \ref{fig:ZeldaWindWaker}).

\begin{figure}[htbp] \centering
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=1\textwidth]{Pictures/Design/BioShockArrow.jpg} % Venstre billede
\end{minipage} \hfill
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=1\textwidth]{Pictures/Design/ZeldaWindWaker.png} % Højre billede
\end{minipage} \\ % Captions og labels
\begin{minipage}[t]{0.45\textwidth}
\caption{In the top of the screen an arrowhead indicates the direction to go \citep{bioshock}.} % Venstre caption og label
\label{fig:BioShock}
\end{minipage} \hfill
\begin{minipage}[t]{0.45\textwidth}
\caption{The main character's eyes are used to draw attention to important objects \citep{zeldaWindWaker}.} % Højre caption og label
\label{fig:ZeldaWindWaker}
\end{minipage}
\end{figure}

Other approaches to hints in games include \textit{The Secret of Monkey Island: Special Edition} (Lucasfilm Games) and \textit{Machinarium} (Amanita Design). These games provide various levels of help where the solution to a puzzle is explained. In \textit{Monkey Island}, you can press a button to get a vague hint. If this isn't enough, you can get a  more explicit hint, and, lastly, if this still is not enough to solve the puzzle, you can press again to get the answer directly. \textit{Machinarium} does something similarly, just with pictures instead of words. However, the player doesn't have direct access to the hint system; he has to earn it by playing a small repetitive minigame to get access to a hint book (see Figure \ref{fig:MachinariumHint}). This is implemented in order to make some kind of barrier-to-entry, so players won't look at the hint immediately when getting stuck on a puzzle.

\begin{figure}[htbp] \centering
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=1\textwidth]{Pictures/Design/MachinariumHint} % Venstre billede
\end{minipage} \hfill
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=1\textwidth]{Pictures/Design/antichamber} % Højre billede
\end{minipage} \\ % Captions og labels
\begin{minipage}[t]{0.45\textwidth}
\caption{If players are stuck, they can play a minigame and get access to a picture book, showing in details how to solve a given puzzle \citep{machinarium}.} % Venstre caption og label
\label{fig:MachinariumHint}
\end{minipage} \hfill
\begin{minipage}[t]{0.45\textwidth}
\caption{An example of the non-linear puzzle map found in the game \textit{Antichamber} \citep{antichamber}.} % Højre caption og label
\label{fig:antichamber}
\end{minipage}
\end{figure}

A different approach is to create the game in a non-linear structure. Examples of this include \textit{Braid} and \textit{Antichamber} (Alexander Bruce) where the player is presented for one puzzle scenario that he should solve. However, if the player finds the puzzle too hard, he can continue and go on to the next one and then come back to the previous puzzle at a later point (see Figure \ref{fig:antichamber}). This non-linear structure ensures that the player does not get fatigued or frustrated, since he can always go and try to solve a different puzzle. It is even possible that by solving a different puzzle will help find the solution to a previous puzzle.

Then there is the extreme case where the game not only helps you solving the puzzle, but actually takes control and solves it for you. \textit{Super Guide} is an initiative created by the Japanese game company Nintendo that tries to standardize how to help players complete their games. In \textit{Super Mario Galaxy 2}, if the player dies repeatedly, the game will offer help by taking control from the player (see Figure \ref{fig:MarioGuide}). Here, a pre-recorded playthrough will begin where Mario moves on his own, until the level is completed. The player can always resume control when he feels ready \citep{superGuide}.

\begin{figure}[htbp]
\centering
\includegraphics[width=0.5\textwidth]{Pictures/Design/MarioGuide}
\caption{In recent \textit{Mario} games, players can get a helping hand. Here, the games takes control of the character and completes the level on its own \citep{marioGalaxy}.}
\label{fig:MarioGuide}
\end{figure}